<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <header id="branding" role="banner">
        <hgroup>
            <h1 id="site-title"><span><a href="https://www.yuuko0623.com/" th:href="@{/home}" rel="home">大萌の记事本</a></span></h1>
            <h2 id="site-description">记录日常生活，看世间繁华</h2>
        </hgroup>
        <!--登录状态-->
        <div th:if="${user==null}">
            <p><a th:href="@{/toLogin}">未登录</a></p>
        </div>
        <div th:if="${user!=null}">
            <p>已登录，用户名：[[ ${user.getUsername()} ]]</p>
            <p><a th:href="@{/toLogin}">登录其他账号</a></p>
        </div>
        <!-- 首图 -->
        <a href="#" th:href="@{/home}">
            <img src="https://www.yuuko0623.com/wp-content/uploads/2017/12/cropped-01.jpg" width="1000" height="288"
                 alt="大萌の记事本"/>
        </a>
        <!-- 搜索 -->
        <form method="get" id="searchform" action="#" th:action="@{/home}" >
            <label for="s" class="assistive-text">搜索</label>
            <input type="text" class="field" name="s" id="s" placeholder="搜索（还未开发完成）"/>
            <input type="submit" class="submit" name="submit" id="searchsubmit" value="搜索"/>
        </form>
        <!-- #搜索 -->
        <!-- access -->
        <nav id="access" role="navigation">
            <h3 class="assistive-text">主页</h3>
            <div class="skip-link">
                <a class="assistive-text" href="#content">跳至主内容区域</a>
            </div>
            <div class="skip-link">
                <a class="assistive-text" href="#secondary">跳至副内容区域</a>
            </div>
            <!-- 导航栏 -->
            <div class="menu-menu-1-container">
                <ul id="menu-menu-1" class="menu">
                    <li id="menu-item-245"
                        class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-246">
                        <a href="https://www.yuuko0623.com" th:href="@{/home}" th:class="${currentTag} == 0 ? 'hightlight menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-221' : 'menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-221'">首页</a>
                    </li>
                    <li id="menu-item-246" th:each="tag:${tags}"
                        class="menu-item menu-item-type-custom menu-item-object-custom current_page_item menu-item-home menu-item-246">
                        <a href="https://www.yuuko0623.com" th:href="@{/home/}  + ${tag.getId()}" th:class="${currentTag} == ${tag.getId()} ? 'hightlight menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-221' : 'menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-221'">[[${tag.getName()}]]</a>
                        <!--高亮：th:class="${currentTag}==${tag.getId()} ? 'avtive' : ''"-->
                    </li>
                </ul>
                <div class="dropdown">
                    <button class="dropbtn" shiro:hasPermission="user:manager">管理博客</button>
                    <div class="dropdown-content">
                        <a href="#" th:href="@{/createArticle}">写博客</a>
                        <a href="#" th:href="@{/toTag}">分类管理</a>
                    </div>
                </div>

            </div>
            <!-- #导航栏 -->
        </nav>
        <!-- #access -->
    </header>
    <!-- #导航、首图、搜索 -->

    <footer id="colophon" role="contentinfo">

        <div id="site-generator">

            <div id="site-generator">

                magnet:?xt=urn:btih:
                <a href="/" title="欢迎光临 大萌个人博客" rel="generator">Power by YUUKO0623.COM </a> Copyright &copy; 2017-2018
                大萌Blog All Rights Reserved
            </div>

        </div>
    </footer>
    <!-- #备注 -->

    <div id="secondary" class="widget-area" role="complementary">
        <aside id="custom_html-2" class="widget_text widget widget_custom_html">
            <div class="textwidget custom-html-widget">
                <div style="width:77px;height:75px;">
                    <img src="https://www-yuuko0623-com-static.smartgslb.com/wp-content/uploads/2018/07/1-1-144x150.png"/>
                </div>
                <br>
                <p>
                    头像是使用原生gravatar的，如果不显示，请科学上网。
                </p>
            </div>
        </aside>
        <!-- #头像-->
        <aside id="archives-2" class="widget widget_archive">
            <h3 class="widget-title">文章归档</h3>
            <ul>
                <li th:each="date:${dates}">
                    <a th:href="'/home/' + ${date}" th:text="${#strings.append(#strings.replace(date,'-','年'),'月')}"></a>
                </li>
            </ul>
        </aside>
        <!-- #文章归档-->
        <aside id="recent-comments-2" class="widget widget_recent_comments">
            <h3 class="widget-title" th:if="${comments != null}">最新评论</h3>
            <ul id="recentcomments">
                <li th:each="comment:${comments}" class="recentcomments"><span class="comment-author-link">[[${comment.getSenderName()}]]</span>发表在《
                    <a th:href="@{'/toArticle/'+${comment.getArticleId()}} ">[[${comment.getArticleName()}]]</a>》
                </li>
            </ul>
        </aside>
        <!-- #最新评论 -->
    </div>
    <!-- #头像、文章归档、最新评论 -->
</body>
</html>